package test.com.googlecode.likesql.converter;

import junit.framework.TestCase;

import com.googlecode.likesql.converter.AtExpConverter;
import com.googlecode.likesql.expression.AtExp;

public class AtStyleExpConverterTester extends TestCase {

	public void testConflictParamNames(){
		String pattern="@name, @names";
		
		AtExp exp=AtExp.at(pattern)
		                         .set("name", "Han Meimei")
		                         .set("names","Lily and Lucy");
		AtExpConverter cvt=new AtExpConverter();
		assertEquals("?, ?",cvt.toTemplate(exp));
		assertEquals("'Han Meimei', 'Lily and Lucy'",cvt.toSql(exp));
	}
}
